1. Field of the Invention
The present invention relates to a microcomputer system reading data from a storage medium and outputting the data in response to a request from a host device, and particularly relates to a microcomputer system capable of outputting data to a host device at high rate.
2. Description of the Background Art
In recent years, various types of systems for reading data from a storage medium and outputting the data in response to a request from a host device have been developed, and one example thereof includes a system which employs an MDIO (Medium Dependent Input/Output) interface for LAN (Local Area Network).
FIG. 1 is a view for explaining the data transfer between a host device and an MDIO interface. The host device is connected to a plurality of systems (which will be simply referred to as xe2x80x9csystemsxe2x80x9d hereinafter) on which MDIO interfaces are mounted, respectively and different port addresses are allocated to the plural systems, respectively. In addition, a storage medium included in each system is divided into a plurality of regions each of several tens of words and different device addresses are allocated to the respective regions. The host device can select a system and a region of the storage medium included in the system and access a desired region by transmitting a port address and a device address.
If reading data from a system, the host device transmits an instruction code 101 indicating data read, a port address 102 and a device address 103 to the systems. Each system determines whether or not access from the host device is to the system while referring to the port address 102. If the host device accesses the system, the system refers to device address 103, reads data 105 from the region of the storage medium corresponding to device address 103, and transmits the read data to the host device. After transmitting device address 103, the host device is required to obtain data 105 before the passage of a turnaround time 104. This turnaround time 104 is normally specified to two cycles. If 2 MHz clock is used, for example, the system should return data 105 to the host device within 1 xcexcs.
If the host device writes data to the storage medium in the system, the host device sequentially transmits instruction code 101 indicating data write, port address 102, device address 103 and data 105 and the system corresponding to port address 102 writes data 105 to the region of the storage medium corresponding to device address 103.
As described above, after the host device transmits device address 103, the system should return data 105 to the host device within turnaround time 104. Turnaround time 104 elapses if a microcomputer in the system reads data from the storage medium and transmits the read data to the host device after receiving device address 103. To realize data transfer within turnaround time 104, therefore, a special hardware has been disadvantageously required.
It is an object of the present invention to provide a microcomputer system capable of transmitting data at high rate in response to a data read request from a host device.
It is another object of the present invention to provide a microcomputer system capable of enhancing flexibility of a system.
According to one aspect of the present invention, a microcomputer system includes: a primary storage medium; a secondary storage medium larger in capacity than the primary storage medium; an interface transmitting and receiving data to and from an outside of the microcomputer system; and a processor reading data corresponding to a upper address from the secondary storage medium and writing the data to the primary storage medium when the interface receives the upper address from the outside of the microcomputer system, wherein when receiving a lower address from the outside of the microcomputer system, the interface transmits the data stored in the primary storage medium and corresponding to the lower address to the outside of the microcomputer system.
When receiving the lower address from the outside of the microcomputer system, the interface transmits data stored in the primary storage medium and corresponding to the lower address. It is, therefore, possible to transmit the data to the outside of the microcomputer system in short time after receiving the lowest address.
According to another aspect of the invention, a microcomputer system includes: a primary storage medium; an interface transmitting and receiving data to and from an outside of the microcomputer system; and a processor, wherein when the interface receives a upper address from the outside of the microcomputer system, the processor reads the data corresponding to the upper address from a secondary storage medium provided outside of the microcomputer system and writes the data to the primary storage medium, and when receiving a lower address from the outside of the microcomputer system, the interface transmits the data stored in the primary storage medium and corresponding to the lower address to the outside of the microcomputer system.
When receiving the lower address from the outside of the microcomputer system, the interface transmits data stored in the primary storage medium and corresponding to the lower address. It is, therefore, possible to transmit the data to the outside of the microcomputer system in short time after receiving the lowest address. In addition, since the secondary storage medium is provided outside of the microcomputer system, it is possible to determine the capacity and the access rate of the secondary storage medium in accordance with the system and to thereby improve the versatility of the microcomputer system.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.